package com.yjj.demo.starter;

import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PreDestroy;

/**
 *
 *
 * @author yangjiajia
 * @createdAt 2023/1/18 17:29
 */
@SpringBootApplication
@Log4j2
public class StarterApplication {

    public static void main(String[] args) {
        SpringApplication.run(StarterApplication.class);
    }

    @PreDestroy
    public void destroy() throws InterruptedException {
        log.info("starter destroy start");
        Thread.sleep(1000);
        log.info("starter destroy end");
    }
}
